import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem;


public class Item extends Seccion{
		
		
	@Override
	protected boolean isSeccionSimple() {
		return true;
	}
	
	@Override
	protected Seccion parse(PDOutlineItem item, PDDocument doc, PDOutlineItem tope) {
		try {
			 super.setTexto(Integer.parseInt(super.getPaginaFinal()), doc, Integer.parseInt(super.getPaginaFinal()));
			 super.setName(item.getTitle());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return this;
	}
	@Override
	protected String read() {
		System.out.print(this.getTexto());
		return this.getTexto() + '\n';
	}
}
